# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=bower
pkgver=0.13
pkgrel=1
pkgdesc="curses frontend for the Notmuch email system"
url="https://github.com/wangp/bower"
# riscv64: blocked by mercury
arch="all !riscv64"
license="GPL-3.0-or-later"
makedepends="
	coreutils
	go-md2man
	gpgme-dev
	mercury
	ncurses-dev
	notmuch-dev
	"
depends="notmuch"
subpackages="$pkgname-doc"
source="https://github.com/wangp/bower/archive/$pkgver/bower-$pkgver.tar.gz
	no-static-link.patch
	"

build() {
	make PARALLEL=$MAKEFLAGS

	# The 'man' make target uses pandoc, which isn't available on some archs
	# (e.g. aarch64). So we use another tool outside of the upstream build
	# system that gets the job done.
	go-md2man -in README.md -out bower.1
}

check() {
	make -C tests
}

package() {
	install -Dm 755 bower "$pkgdir/usr/bin/bower"
	install -Dm 644 bower.1 \
		"$pkgdir/usr/share/man/man1/bower.1"
	}

sha512sums="
92ce7db45077068bcdb01558b84816108acf4675205aef9572261ca372c86f6a11f596f34c9f5c22c0f594b6eae1afc449cf4024d2ec1cd653516fd52e512cf7  bower-0.13.tar.gz
35d6ee3ad2e7e52ce5f64f3709b4ed96b14eb04b7288b1301ef509d7fb3032fffbed40456ba898f2cbf2e90655fc70d66e31538a284f1d94af8e20e097cdc1f1  no-static-link.patch
"
